fix(ScrollArea): reset scroll when viewport content changes (#1349)#1994
fix(ScrollArea): reset scroll when viewport content changes (#1349)#1994kotAPI wants to merge 1 commit into
Conversation
Reset scroll position and thumb layout when childList mutations swap viewport content so tab switches do not keep a stale scroll offset.
|
|
Warning Review limit reached
More reviews will be available in 8 minutes and 54 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
CoverageThis report compares the PR with the base branch. "Δ" shows how the PR affects each metric.
Coverage improved or stayed the same. Great job! Run |
|
Closing as duplicate of #2045 |
Summary
scrollTop/scrollLeftto 0 when the viewport receiveschildListmutations (e.g. tab content swap) and recalculate thumb sizes/position.Fixes #1349
Test plan
npm test -- src/components/ui/ScrollArea/tests/ScrollArea.test.tsx